#ifndef __LIGHT_STATE_H__
#define __LIGHT_STATE_H__

#include "Light.h"
#include "RenderState.h"

class LightState : public RenderState
{
public:
	LightState();
	virtual ~LightState();

	virtual Type get_type() const;
	virtual void update( RenderState*& old_state );
	virtual void restore( RenderState* old_state );

	enum { MAX_LIGHTS = 8 };

	unsigned int attach( Light* light );
	unsigned int detach( Light* light );
	LightPtr detach( unsigned int index );

	void detach_all();
	unsigned int get_lights() const;
	Light* get( unsigned int index );

protected:
	LightPtr m_light[MAX_LIGHTS];
};

#endif
